import PlcList from "@/views/iFactory/fullview/config/plcLocation";

// label 栏配置
export const labelList = [
  {
    value: 1,
    label: "卧理机",
    componentName:'Recumbent'
  },
  {
    value: 3,
    label: "磨边机",
    componentName:'Edge'
  },
  {
    value: 4,
    label: "清洗机",
    componentName:'Clean'
  },
  {
    value: 7,
    label: "清洗机后输送台",
    componentName:'Stage'
  },
  {
    value: 5,
    label: "钢化前小车",
    componentName:'Cat'
  },
  {
    value: 10,
    label: "理片笼",
    componentName:'cage'
  },
  {
    value: 8,
    label: "分片台",
    componentName:'Shard'
  },
  {
    value: 6,
    label: "钢化炉",
    componentName:'Temper'
  },
  {
    value: 9,
    label: "钢化炉后输送台",
    componentName:'TemperAfter'
  },

  {
    value: 12,
    label: "中空小车",
    componentName:'catB'
  },
  {
    value: 13,
    label: "双理片笼",
    componentName:'doubleCage'
  },
  {
    value: 14,
    label: "中空线",
    componentName:'kongLine'
  },
];

// 卧理机
export const recumentList = [
  {
    name: "1#卧理机",
    value: 0,
    dictValue: 500,
    deviceType: "卧理机",
    id: 1,
    rangValue: PlcList.recumetGlass,
  },
  {
    name: "2#卧理机",
    value: 1,
    dictValue: 501,
    deviceType: "卧理机",
    id: 2,
    rangValue: PlcList.recumetGlass2,
  },
  {
    name: "3#卧理机",
    value: 2,
    dictValue: 502,
    deviceType: "卧理机",
    id: 3,
    rangValue: PlcList.recumetGlass3,
  },
];

// 磨边机
export const edgeList = [
  {
    id: 1,
    name: "1#磨边机",
    value: 0,
    dictValue: 519,
    deviceType: "磨边机",
    rangValue: [...PlcList.glassListA12, ...PlcList.glassListB12],
  },
  {
    id: 2,
    name: "2#磨边机",
    value: 1,
    dictValue: 520,
    deviceType: "磨边机",
    rangValue: [...PlcList.glassListA22, ...PlcList.glassListB22],
  },
  {
    id: 3,
    name: "3#磨边机",
    value: 2,
    dictValue: 521,
    deviceType: "磨边机",
    rangValue: [...PlcList.glassListA32, ...PlcList.glassListB32],
  },
  {
    id: 4,
    name: "4#磨边机",
    value: 3,
    dictValue: 522,
    deviceType: "磨边机",
    rangValue: [...PlcList.glassListA42, ...PlcList.glassListB42],
  },
  {
    id: 5,
    name: "5#磨边机",
    value: 4,
    dictValue: 523,
    deviceType: "磨边机",
    rangValue: [],
  },
];

// 清洗机
export const cleanList = [
  {
    name: "1#清洗机",
    value: 0,
    rangValue: [],
  },
  {
    name: "2#清洗机",
    value: 1,
    rangValue: [],
  },
  {
    name: "3#清洗机",
    value: 2,
    rangValue: [],
  },
  {
    name: "4#清洗机",
    value: 3,
    rangValue: [],
  },
  {
    name: "5#清洗机",
    value: 4,
    rangValue: [],
  },
];

// 钢化前小车
export const cat = [
  {
    name: "进笼小车1",
    value: 0,
    dictValue: 1250,
    deviceType: "小车",
    id: 1,
    rangValue: PlcList.afterCatGlass1,
  },
  {
    name: "进笼小车2",
    value: 1,
    dictValue: 1251,
    deviceType: "小车",
    id: 2,
    rangValue: PlcList.afterCatGlass2,
  },
  {
    name: "出笼小车1",
    value: 2,
    dictValue: 1252,
    deviceType: "小车",
    id: 3,
    rangValue: PlcList.beforeCatGlass1,
  },
  {
    name: "出笼小车2",
    value: 3,
    dictValue: 1253,
    deviceType: "小车",
    id: 4,
    rangValue: PlcList.beforeCatGlass2,
  },
];
// 理片笼
export const cage = [
  {
    name: "理片笼",
    value: 0,
    deviceType: "笼前",
    id: 0,
  },
];

// 底车
export const underCat = [
  {
    name: "底车1",
    value: 0,
    deviceType: "底车",
    id: 1,
    rangValue: [],
  },
  {
    name: "底车2",
    value: 1,
    deviceType: "底车",
    id: 2,
    rangValue: [],
  },
  {
    name: "底车3",
    value: 2,
    deviceType: "底车",
    id: 3,
    rangValue: [],
  },
  {
    name: "底车4",
    value: 3,
    deviceType: "底车",
    id: 4,
    rangValue: [],
  },
];

// 钢化炉
export const temperList = [
  {
    id: 2,
    deviceType: "钢化炉",
    name: "钢化炉一号",
    value: 0,
    dictValue: 1210,
    rangValue: [],
  },
  {
    id: 3,
    deviceType: "钢化炉",
    name: "钢化炉二号",
    value: 1,
    dictValue: 20,
    rangValue: [],
  },
];
export const temperAfter = [
  {
    id: 1,
    deviceType: "钢化后输送台",
    name: "钢化后台子",
    value: 0,
    dictValue: 1210,
    rangValue: [],
  },
];

// 输送台类型
export const stageTypeList = [
  {
    name: "一线清洗后",
    value: 0,
    dictValue: [1101, 1166, 1166, 1100],
    deviceValue: ["A23.1", "A14.1", "A14.2", "A14"],
    rangValue: [...PlcList.glassListC12, ...PlcList.glassListD12],
  },
  {
    name: "二线清洗后",
    value: 1,
    dictValue: [1104, 1103, 1102, 1102],
    deviceValue: ["A25.1", "A24", "A13.4", "A13.2"],
    rangValue: [...PlcList.glassListC22, ...PlcList.glassListD22],
  },
  {
    name: "三线清洗后",
    value: 2,
    dictValue: [1145, 1127, 1105, 1105],
    deviceValue: ["A25", "A24.1", "A13.1", "A13"],
    rangValue: [...PlcList.glassListC32, ...PlcList.glassListD32],
  },
  {
    name: "四线清洗后",
    value: 3,
    dictValue: [1110, 1107, 1106, 1106],
    deviceValue: ["A23", "A15", "A14.4", "A14.3"],
    rangValue: [...PlcList.glassListC42, ...PlcList.glassListD42],
  },
  {
    name: "五线清洗后",
    value: 4,
    dictValue: [1240, 1108, 1109, 1168],
    deviceValue: ["A19", "A16", "A17", "A18"],
    rangValue: [],
  },
];

// 分片台类型
export const shardTypeList = [
  {
    name: "1#分片台",
    value: 0,
    dictValue: [1164, 1210, 1211, 1212, 1213, 1214].reverse(),
    deviceValue: ["A27", "A27.1", "A23.2", "A30.1", "A31", "A33"].reverse(),
    rangValue: [
      ...PlcList.A232,
      ...PlcList.A25,
      ...PlcList.A251,
      ...PlcList.A271,
      ...PlcList.A301,
      ...PlcList.A31,
      ...PlcList.A33,
    ],
  },
  {
    name: "2#分片台",
    value: 1,
    dictValue: [1215, 1216, 1173, 1217, 1218, 1246, 1220].reverse(),
    deviceValue: [
      "A27.2",
      "A23.3",
      "A22",
      "A28",
      "A30",
      "A29",
      "A32",
    ].reverse(),
    rangValue: [],
  },
];
// 中空小车
export const catB = [
  {
    name: "进笼小车1",
    value: 0,
    dictValue: 'ZK_A1',
    deviceType: "小车",
    id: 100,
    rangValue: PlcList.afterCatGlass1,
  },
  {
    name: "进笼小车2",
    value: 1,
    dictValue: 'ZK_A2',
    deviceType: "小车",
    id: 101,
    rangValue: PlcList.afterCatGlass2,
  },
  {
    name: "配对小车1",
    value: 2,
    dictValue: 'ZK_B1',
    deviceType: "小车",
    id: 200,
    rangValue: PlcList.afterCatGlass1,
  },
  {
    name: "配对小车2",
    value: 3,
    dictValue: 'ZK_B2',
    deviceType: "小车",
    id: 201,
    rangValue: PlcList.afterCatGlass2,
  },
  {
    name: "出笼小车1",
    value: 4,
    dictValue: 'ZK_C1',
    deviceType: "小车",
    id: 300,
    rangValue: PlcList.beforeCatGlass1,
  },
  {
    name: "出笼小车2",
    value: 5,
    dictValue: 'ZK_C2',
    deviceType: "小车",
    id: 301,
    rangValue: PlcList.beforeCatGlass2,
  },
];
// 双理片笼
export const doubleCage = [
  {
    name: "理片笼A",
    value: 0,
    deviceType: "笼前",
    id: 0,
  },
  {
    name: "理片笼B",
    value: 1,
    deviceType: "笼前",
    id: 1,
  },
];

// 双笼底车
export const doubleUnderCarA = [
  {
    name: "底车1",
    value: 0,
    deviceType: "底车",
    id: 11,
  },
  {
    name: "底车2",
    value: 1,
    deviceType: "底车",
    id: 12,
  },
  {
    name: "底车3",
    value: 2,
    deviceType: "底车",
    id: 13,
  },
  {
    name: "底车4",
    value: 3,
    deviceType: "底车",
    id: 14,
  },
  {
    name: "底车5",
    value: 4,
    deviceType: "底车",
    id: 15,
  },
];

export const doubleUnderCarB = [
  {
    name: "底车1",
    value: 0,
    deviceType: "底车",
    id: 21,
  },
  {
    name: "底车2",
    value: 1,
    deviceType: "底车",
    id: 22,
  },
  {
    name: "底车3",
    value: 2,
    deviceType: "底车",
    id: 23,
  },
  {
    name: "底车4",
    value: 3,
    deviceType: "底车",
    id: 24,
  },
  {
    name: "底车5",
    value: 4,
    deviceType: "底车",
    id: 25,
  },
];

// 中空线
export const kongLine = [
  {
    name: "中空一线",
    value: 0,
    dictValue: 2000,
    deviceType: "中空线",
    id: 1,
    rangValue: [],
  },
  {
    name: "中空二线",
    value: 1,
    dictValue: 2001,
    deviceType: "中空线",
    id: 2,
    rangValue: [],
  },
  {
    name: "中空三线",
    value: 2,
    dictValue: 2002,
    deviceType: "中空线",
    id: 3,
    rangValue: [],
  },
  {
    name: "中空四线",
    value: 3,
    dictValue: 2003,
    deviceType: "中空线",
    id: 4,
    rangValue: [],
  },
];

export const mergeList = [
  ...recumentList,
  ...edgeList,
  ...cat,
  ...temperList,
  ...shardTypeList,
  ...stageTypeList,
];
